import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const Student = () => import('../components/Student.vue')
const AddStudent = () => import('../components/AddStudent.vue')
const DelStudent = () => import('../components/DelStudent.vue')
const QueryStu = () => import('../components/QueryStu.vue')

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '',
      redirect: '/student'
    },
    {
      path: '/student',
      component: Student
    },
    {
      path: '/addstudent',
      component: AddStudent
    },
    {
      path: '/delstudent',
      component: DelStudent
    },
    {
      path: '/querystu',
      component: QueryStu
    }
  ]
})
